import OSS from "ali-oss";
const config = useRuntimeConfig()
// let   accessKeyId=import.meta.env.VITE_ALIBABA_CLOUD_ACCESS_KEY_ID
// let  accessKeySecret= import.meta.env.VITE_ALIBABA_CLOUD_ACCESS_KEY_SECRET


const client = new OSS({
  region: "oss-cn-shenzhen",
  accessKeyId: 'LTAI5tJ1agEDGBbvDiQ65Cjh',
  accessKeySecret: 'XszgFC0GQ0eF9EFJXQsNBE446GFp8w',
  bucket: "8-134-153-121",
});
// console.log(client,'shabi');

export default defineEventHandler(async (event: any) => {
  const result = await client.list({
    prefix: "imgfile/", //列出文件浅醉
  });
  return {
    code: 2000,
    result,
  };
});
